#pragma once
#include "cocos2d.h"
class CCMySprite : public cocos2d::CCSprite
{
protected:
	bool isDone, isTrackPoint, isTrash,isStopTouchingPoint
		,isAnimationFinished, isCCFinished;
	float a;
	cocos2d::CCPoint previousPosition;
	cocos2d::CCString* fileName;
	int _id;

	float blood, lifeTime;
	cocos2d::CCArray *batchNodeSheetArr, *spSheetArray;
	cocos2d::CCLabelTTF *myNotification;
	
	///methods
public:
	cocos2d::CCLabelTTF* getMyNotification();
	void setMyNotification(cocos2d::CCLabelTTF* value);

	float getBlood();
	void setBlood(float value);

	bool getIsAnimationFinished();
	void setIsAnimationFinished(bool is);

	cocos2d::CCArray* getSpSheetArray();
	void setSpSheetArray(cocos2d::CCArray* spSheetArr);


	void setBacthNodeSheetArr(cocos2d::CCArray* arr);
	cocos2d::CCArray* getBacthNodeSheetArr();

	void setLifeTime(float time);
	float getLifeTime();

	void setFileName(cocos2d::CCString* name);
	cocos2d::CCString* getFileName();

	void setIsActive(bool is);
	bool getIsActive();

	void setID(int i);
	int getID();
	int getIDFromDigit(int fr);

	void setIsStopTouchingPoint(bool is);
	bool getStopTouchingPoint();

	void setIdSequence(int idsq);
	int getIdSequence();

	void setIsTrackPoint(bool is);
	bool getIsTrackPoint();


	void setIsDone(bool is);
	bool getIsDone();

	void setPreviousPosition(cocos2d::CCPoint pos);
	cocos2d::CCPoint getPreviousPosition();

	int getRandomNum(int max, int min);
	static CCMySprite* createWithTexture(cocos2d::CCTexture2D *pTexture);
	static CCMySprite* create(const char *pszFileName);
	static CCMySprite* create();
	void doScaleEffect(float iDruration,float scaleNumX,float scaleNumY,int iTimes);
	void doRotate360Effect(float iDuration,int iTimes);
	void doRotate360Effect(float iDuration);
	void doShakingEffect(float iDuration,float fAngle,int iTimes);

	void copyValue(CCMySprite* sp);
public:
	CCMySprite(void);
	~CCMySprite(void);
};

